package com.matt.foundation.constant;

import lombok.Setter;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/3/23
 * *******************************
 */
public class NoticeMessageConstant {

    public enum Category{
        KXTHEME_COURSE_PREPARE(14, "\"%s\"%s的主课程\"%s\"尚未提交备课审核", "%s/prepare/detail?id=%s", ""),
        KXTHEME_COURSE_REJECTED(15, "\"%s\"%s的主课程\"%s\"的备课审核未通过", "%s/prepare/detail?id=%s", ""),
        KXTHEME_COURSE_AUDIT(16, "\"%s\"%s的主课程\"%s\"已完成备课, 等待审核", "%s/audit/detail?id=%s", ""),
        KXTHEME_AUDITOR(17, "园区尚未设置主课程备课审核者", "%s/course/audit", ""),

       // AREA_BUILD_AUDITOR(13, "园区尚未设置自建课程备课审核者", "%s/course/audit", ""),
        AREABUILD_COURSE_PREPARE(18, "\"%s\"%s自建课\"%s\"尚未提交备课审核", "%s/prepare/detail?id=%s", ""),
        AREABUILD_COURSE_REJECTED(19, "\"%s\"%s的自建课\"%s\"的备课审核未通过", "%s/prepare/detail?id=%s", ""),
        AREABUILD_COURSE_AUDIT(20, "\"%s\"%s的自建课\"%s\"已完成备课, 等待审核", "%s/audit/detail?id=%s", ""),
        AREABUILD_AUDITOR(21, "园区尚未设置自建课课程备课审核者", "%s/course/audit", ""),

        THEME_COURSE_PREPARE(1, "\"%s\"%s的主题课\"%s\"尚未提交备课审核", "%s/prepare/detail?id=%s", ""),
        EARLY_COURSE_PREPARE(2, "\"%s\"%s的早教课\"%s\"尚未提交备课审核", "%s/prepare/detail?id=%s", ""),
        LIVE_PLAN_PREPARE(3, "\"%s\"下周的一日生活流程尚未提交审核", "%s/course/entrustPlan?classesId=%s&date=%s", ""),
        THEME_COURSE_REJECTED(4, "\"%s\"%s的主题课\"%s\"的备课审核未通过", "%s/prepare/detail?id=%s", ""),
        EARLY_COURSE_REJECTED(5, "\"%s\"%s的早教课\"%s\"的备课审核未通过", "%s/prepare/detail?id=%s", ""),
        LIVE_PLAN_REJECTED(6, "\"%s\"%s的一日生活流程的审核未通过", "%s/course/entrustPlan?classesId=%s&date=%s", ""),
        THEME_COURSE_AUDIT(7, "\"%s\"%s的主题课\"%s\"已完成备课, 等待审核", "%s/audit/detail?id=%s", ""),
        EARLY_COURSE_AUDIT(8, "\"%s\"%s的早教课\"%s\"已完成备课, 等待审核", "%s/audit/detail?id=%s", ""),
        LIVE_PLAN_AUDIT(9, "\"%s\"%s的一日生活流程已完成, 等待审核", "%s/course/entrustPlan?classesId=%s&date=%s", ""),
        NURSERY_AUDITOR(10, "园区尚未设置托班课程备课审核者", "%s/course/audit", ""),
        EARLY_AUDITOR(11, "园区尚未设置托班课程备课审核者", "%s/course/audit", ""),
        LIVE_AUDITOR(12, "园区尚未设置托班课程备课审核者", "%s/course/audit", ""),
        ;
        @Setter
        private int code;

        @Setter
        private String message;

        @Setter
        private String url;

        @Setter
        private String description;

        Category(int code, String message, String url, String description){
            this.code = code;
            this.message = message;
            this.url = url;
            this.description = description;
        }

        public int codeOf(){
            return code;
        }

        public String messageOf(){
            return message;
        }

        public String urlOf(){return url;}

        public String descriptionOf(){return description;}

        public Category get(int code){
            for (Category category : values()) {
                if (category.codeOf()==code)
                    return category;
            }
            return null;
        }
    }

    public enum DueStatus{
        NON_DUE(0, "未过期"),
        DUE(1, "已过期"),
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        DueStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public DueStatus get(int code){
            for (DueStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }

}
